/** ROI管理路由 */
import Layout from '@/views/layout/preRevenueLayout'

const layout = function (meta = {}, path = '/preRevenue', requiresAuth = true) {
    return {
        path: path,
        component: Layout,
        meta: {
            requiresAuth: requiresAuth,
            ...meta
        }
    }
}

export default [
    {
        ...layout({
            permissions: ['preRevenue', 'groupPreRevenue']
        }),
        children: [{
            path: 'groupPreRevenue', // 员工与
            component: () => import('@/views/admin/roi/preRevenueStatis'),
            meta: {
                title: '公司收益',
                icon: 'groupPreRevenue'
            }
        }]
    },
    {
        ...layout({
            permissions: ['preRevenue', 'deptPreRevenue']
        }),
        children: [{
            path: 'deptPreRevenue', // 员工与
            component: () => import('@/views/admin/roi/preRevenueStatisDept'),
            meta: {
                title: '部门收益',
                icon: 'deptPreRevenue'
            }
        }]
    }
]
